using Cesium3DTilesSelection;
using System.Collections.Generic;
using UnityEngine;

public class CesiumTileMapServiceRasterOverlay : CesiumRasterOverlay
{

    public string Url;
    public bool bSpecifyZoomLevels = false;

    [Range(0, 25)]
    public int MinimumLevel = 0;
    [Range(0, 25)]
    public int MaximumLevel = 10;

    protected override RasterOverlay CreateOverlay()
    {

        TileMapServiceRasterOverlayOptions Options = new TileMapServiceRasterOverlayOptions();
        if (MaximumLevel > MinimumLevel && bSpecifyZoomLevels)
        {
            Options.minimumLevel = MinimumLevel;
            Options.maximumLevel = MaximumLevel;
        }
        return new TileMapServiceRasterOverlay(this.MaterialLayerKey, this.Url, new Dictionary<string, string>(), Options);
    }
}